package com.llkj.qingnianguoxue.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.llkj.qingnianguoxue.R;
import com.llkj.qingnianguoxue.bean.MusicLikeBean;
import com.llkj.qingnianguoxue.util.ImageLoadingUtil;

import java.util.List;

/**
 * 曲库——我喜欢
 */
public class MusicLikeAdapter extends BaseQuickAdapter<MusicLikeBean, BaseViewHolder> {

    public MusicLikeAdapter(int layoutResId, List<MusicLikeBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, MusicLikeBean item) {
        baseViewHolder.setText(R.id.tv_music_title, item.getTitle());
        baseViewHolder.setText(R.id.tv_count, item.getSingCount()+"人唱过");
        ImageView ivCorver = baseViewHolder.getView(R.id.iv_music_corver);
        ImageLoadingUtil.loadImgGlideRoundCenterCrop(ivCorver,item.getCoverUrl());

    }

}
